package cn.qf;

public class ArithmeticApp {
    public static void main(String[] args) {
        Arithmetic arithmetic = new Arithmetic();

        int a = 18;
        int b = 34;
        double c = 3.14;
        String d = "unknown";

        // a + b
        // 格式化输出的替代符:
        // %d - 整型
        // %f - 浮点
        // %s - 字符串
        System.out.printf("%d + %d = %d\n", a, b, arithmetic.plus(a, b));

        // a + c
        System.out.printf("%d + %f = %f\n", a, c, arithmetic.intPlusDouble(a, c));
        System.out.printf("%d + %f = %f\n", a, c, arithmetic.plus(a, c));

        // b + c
        System.out.printf("%d + %f = %f\n", b, c, arithmetic.plus(b, c));

        arithmetic.minus(10, 125.5);

        arithmetic.minus(35456435L, 6876897478L);

        arithmetic.minus(0xFFFFFL, 0xFFFFFFL);
    }
}
